import request from '@/utils/request'
/**
 *
 * 服务员工管理
 *
 **/
// 分页查询接口
export const getServiceEmployeePage = (params: any) => {
  return request({
    url: '/service-provider/page',
    method: 'get',
    params
  })
}

// 批量删除接口
export const deleteServiceEmployee = (ids: string) => {
  return request({
    url: '/service-provider',
    method: 'delete',
    params: { ids }
  })
}

// 修改接口
export const editServiceEmployee = (params: any) => {
  return request({
    url: '/service-provider',
    method: 'put',
    data: { ...params }
  })
}

// 新增接口
export const addServiceEmployee = (params: any) => {
  return request({
    url: '/service-provider',
    method: 'post',
    data: { ...params }
  })
}

// 查询详情
export const queryServiceEmployeeById = (id: string | (string | null)[]) => {
  return request({
    url: `/service-provider/${id}`,
    method: 'get'
  })
}

// 启用停用接口
export const serviceEmployeeStatusByStatus = (params: any) => {
  return request({
    url: `/service-provider/status/${params.status}`,
    method: 'post',
    params: { id: params.id }
  })
}

// 根据分类id查询服务人员
export const queryServiceEmployeeByCategoryId = (params: any) => {
  return request({
    url: '/service-provider/list',
    method: 'get',
    params
  })
}

// 获取服务分类列表
export const getServiceCategoryList = (params: any) => {
  return request({
    url: '/service-provider/list',
    method: 'get',
    params
  })
}